package com.youkeda.kafka.study.control;

import com.youkeda.kafka.study.model.SummaryData;
import com.youkeda.kafka.study.service.StudyDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.sound.midi.Soundbank;

/**
 * @ClassName ConsumerControl
 * @Author 刘正星
 * @Date 2021/4/29 上午10:51
 * @Description
 */
@RestController
public class ConsumerControl {

    @Autowired
    private StudyDataService studyDataService;

    @GetMapping("/get/data")
    public SummaryData getSummaryData(@RequestParam("name")String name){

        return studyDataService.findStudyData(name);
    }


}
